package edu.neu.ecommerceplatform.mapper;

import edu.neu.ecommerceplatform.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface UserMapper {

    List<User> findAll();
    User findByName(String name);
    User findByPhone(String phoneNumber);
    User findById(Integer id);
    int updateNameByPhone(@Param("phone") String phoneNumber, @Param("name") String name);
    int save(User user);
    void deleteById(Integer id);
    List<User> findUsersByProductId(Integer productId);
}
